import request from '@/utils/request'

// 查询脚本信息列表
export function listScript(query) {
  return request({
    url: '/circuitDesign/script/list',
    method: 'get',
    params: query
  })
}

// 查询脚本信息列表
export function allListScript(query) {
  return request({
    url: '/circuitDesign/script/allList',
    method: 'get',
    params: query
  })
}

// 查询脚本信息详细
export function getScript(id) {
  return request({
    url: '/circuitDesign/script/' + id,
    method: 'get'
  })
}

// 新增脚本信息
export function addScript(data) {
  return request({
    url: '/circuitDesign/script',
    method: 'post',
    data: data
  })
}

// 新增全部信息
export function addAllScript(data, sceneId) {
  return request({
    url: '/circuitDesign/script/addAll',
    method: 'post',
    data: data,
    params: {'sceneId': sceneId}
  })
}

// 修改脚本信息
export function updateScript(data) {
  return request({
    url: '/circuitDesign/script',
    method: 'put',
    data: data
  })
}

// 删除脚本信息
export function delScript(id) {
  return request({
    url: '/circuitDesign/script/' + id,
    method: 'delete'
  })
}


